ChildColumnMembers Property

       

Returns a PivotColumnMembers collection that represents the children of the specified PivotColumnMember object.

expression.ChildColumnMembers

expression   Required. An expression that returns a PivotColumnMember object.

Example

This example sets a variable to the total amount shipped via 2-Day shipping to postal code 28016 in North Carolina.

Sub Get2DayShippingToNC()

    Dim ptData
    Dim pmRowMember
    Dim pmColMember
    Dim pmPageMember
    Dim pmIntersection
    Dim dblShipTotal

    Set ptData = PivotTable1.ActiveData

    ' Set a variable to a row field member.
    Set pmRowMember = ptData.RowAxis.RowMember.ChildRowMembers("North Carolina")

    ' Set a variable to a column field member.
    Set pmColMember = ptData.ColumnAxis.ColumnMember.ChildColumnMembers("2-Day")

    ' Set a variable to a page field member.
    Set pmPageMember = ptData.PageAxis.PageMember.ChildPageMembers("28016")

    ' Set a variable to the intersection of the row, column, and page field members.
    Set pmIntersection = ptData.CellsEx(pmRowMember, pmColMember, pmPageMember)

    ' Set a variable to the total shipping amount for the item.
    dblShipTotal = pmIntersection.Aggregates("Shipping").Value

End Sub